#include <cstdio>

const int N = 3005, mod = 1e9 + 7;
int n, m;
unsigned int f[2][N][N];

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#endif
#ifndef LOCAL
  freopen("AT2370 [AGC013D] Piling Up.in", "r", stdin);
  freopen("AT2370 [AGC013D] Piling Up.out", "w", stdout);
#endif
#endif

  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    f[0][0][i] = 1;
  }
  f[1][0][0] = 1;
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j <= n; ++j) {
      if (j - 1 >= 0) {
        if (j == 1)
          (f[1][i + 1][j - 1] += f[0][i][j]) %= mod, (f[1][i + 1][j] += f[0][i][j]) %= mod;
        else
          (f[0][i + 1][j - 1] += f[0][i][j]) %= mod, (f[0][i + 1][j] += f[0][i][j]) %= mod;
        (f[1][i + 1][j - 1] += f[1][i][j]) %= mod;
        (f[1][i + 1][j] += f[1][i][j]) %= mod;
      }
      if (j + 1 <= n) {
        (f[0][i + 1][j + 1] += f[0][i][j]) %= mod;
        (f[1][i + 1][j + 1] += f[1][i][j]) %= mod;
        (f[0][i + 1][j] += f[0][i][j]) %= mod;
        (f[1][i + 1][j] += f[1][i][j]) %= mod;
      }
    }
  }
  int ans = 0;
  for (int i = 0; i <= n; ++i) {
    (ans += f[1][m][i]) %= mod;
  }
  printf("%d", ans);
  return 0;
}